A = a b c d
B = $(foreach f, $(A), $(f).o)

C = a b c d/

D = $(filter %/, $(C)) # 过滤出以 / 结尾的文件（目录路径）
E = $(filter-out %/, $(C)) # 过滤掉以 / 结尾的文件（目录路径）

files = $(wildcard *.c) # 取出当前目录真实存在的.c文件

files2 = a.c b.c c.c d.c e.c abc
files3 = $(wildcard $(files2)) # wildcard 取出真实存在的文件

dep_files = $(patsubst %.c, %.d, $(files2)) # 从列表($(files2))中取出每个值, 如果符合pattern(%.c), 则替换为replacement(%.d)

all:
	@echo B = $(B)
	@echo D = $(D)
	@echo E = $(E)
	@echo files = $(files)
	@echo files3 = $(files3)
	@echo dep_files = $(dep_files)

